import request from '@/utils/request'

// 等级列表
export function getMemberLevelList(data?: any) {
  return request({
    url: '/scrm-api/console/member/level/list',
    method: 'post',
    data
  })
}

// 等级详情
export function getMemberLevelInfo(data: any) {
  return request({
    url: '/scrm-api/console/member/level/info',
    method: 'post',
    data
  })
}

// 添加等级
export function addMemberLevel(data: any) {
  return request({
    url: '/scrm-api/console/member/level/add',
    method: 'post',
    data
  })
}

// 编辑等级
export function updateMemberLevel(data: any) {
  return request({
    url: '/scrm-api/console/member/level/edit',
    method: 'post',
    data
  })
}

// 删除等级
export function delMemberLevel(data: any) {
  return request({
    url: '/scrm-api/console/member/level/del',
    method: 'post',
    data
  })
}


// 等级启用-停用
export function changeSwitchMemberLevel(data: any) {
  return request({
    url: '/scrm-api/console/member/level/change-switch',
    method: 'post',
    data
  })
}

// 成长规则查看
export function getGrowthDetail(data: any) {
  return request({
    url: '/scrm-api/console/member/growth/detail',
    method: 'post',
    data
  })
}

// 设置成长规则
export function saveGrowthDetail(data: any) {
  return request({
    url: '/scrm-api/console/member/growth/save',
    method: 'post',
    data
  })
}

// 等级日志
export function getMemberLevelListChangeRecord(data: any) {
  return request({
    url: '/scrm-api/console/member/level/change-record',
    method: 'post',
    data
  })
}